<?xml version="1.0" encoding="UTF-8"?>
<!--
To change this template, choose Tools | Templates
and open the template in the editor.
-->
<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml"
      xmlns:ui="http://java.sun.com/jsf/facelets"
      xmlns:h="http://java.sun.com/jsf/html"
      xmlns:f="http://java.sun.com/jsf/core">
    <h:head>
        <title>Forum</title>
    </h:head>
    <h:body>
    <ui:composition template="/templates/layout.xhtml">
        
        <div class="menu">
          <!-- this is the menu, the comments above applies here too -->
          <ui:insert name="menu">
            <ui:include src="/templates/menu2.xhtml" />
          </ui:insert>
        </div>
        
      <ui:define name="content">
        <div>
            <h2>Forum meldinger </h2>
            
        <h:dataTable value="#{forummldlistbean.forummld}" var="forum"
                     styleClass="data">
          <h:column>
            <f:facet name="header">Navn</f:facet>
            <h:link outcome="forum?navn=#{forum.navn}">#{forum.navn}</h:link>
          </h:column>
          <h:column>
            <f:facet name="header">Melding</f:facet>
            #{forum.mld}
          </h:column>
        </h:dataTable>
            
    </div>
          <h:link value="Ny melding" outcome="forum?mld=0" />
      </ui:define>
    </ui:composition>
  </h:body>
</html>